<include file="public@header" />
<style>
    .controls{ color:#999}
    .minwidth{width:45px !important}
    div[name='d_gaiban'],div[name='d_al']{ width:100%;float:left;}
    .form-horizontal .control-group1{}
    .inputw{width:80px !important;}
    .marleft{margin-left: 90px !important;}
</style>
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('tombarea/index')}">{:lang('ADMIN_TOMBAREA_INDEX')}</a></li>
			<li><a href="{:url('tombarea/add')}">{:lang('ADMIN_TOMBAREA_ADD')}</a></li>
			<li class="active"><a href="{:url('tombarea/productinfo')}">{:lang('ADMIN_TOMBAREA_PRODUCT')}</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form" action="{:url(' productinfo_post')}">
			<fieldset>
                <div class="p_title">
                    <span class="span_title">基础信息</span>
                </div>
                <div class="control-group1-p" style="padding-top:20px;">
                    <div class="control-group1" style="width:100%;">
                        <label class="control-label">状态</label>
                        <div class="controls">
                            <select class="form-control">
                                <option>启用</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">左右长度</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">进深宽度</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1" style="width:50%;">
                        <label class="control-label">占地面积</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                            <input type="checkbox" value="">含拜道
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">拜道长度</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">拜道宽度</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">类型</label>
                        <div class="controls">
                            <select class="form-control">
                                <option>组合艺术墓</option>
                                <option>单体艺术墓</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">设计墓穴</label>
                        <div class="controls">
                            <select class="form-control">
                                <option>5套</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">当前制作墓碑</label>
                        <div class="controls">
                            <select class="form-control">
                                <option>3套</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">最高限制高程</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">外围设置</label>
                        <div class="controls">
                            <select class="form-control">
                                <option>无</option>
                                <option>栏杆</option>
                                <option>绿化</option>
                                <option>绿化+栏杆</option>
                                <option>其他装饰物</option>
                            </select>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">石材装饰物</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">墓穴维护期</label>
                        <div class="controls">
                            <input type="text" class="form-control" value="">
                        </div>
                    </div>
                </div>
                <div class="p_title">
                    <span class="span_title">方案详情</span>
                </div>
                <div class="control-group1-p" style="padding-top:20px;">
                    <div class="control-group1" style="width:100%;">
                        <label class="control-label">上传签章方案</label>
                        <div class="controls">
                            <div class="btn btn-primary" id="check-btn">添加上传</div>
                        </div>
                    </div>
                    <div style="width:100%;float:left">
                        <div class="control-group1" style="width:8%">

                            <label  class="control-label">【<input type="text" name="name2" value="定制墓穴1" style="width: 70px;border: 0">】</label>
<!--                            <label>【定制墓穴1】：</label>-->
                        </div>
                        <div class="control-group1" style="width:16%;">
                            <label class="control-label" style="width:80px">占地规格：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:120px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓碑总高：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓穴规制：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:20%;">
                            <label class="control-label" style="width:100px">单穴最大尺寸：</label>
                            <div class="controls" style=" margin-left:110px;">
                                <input type="text" class="form-control" value="" >
                            </div>
                        </div>
                        <div class="control-group1" style="width:18%;">
                            <label class="control-label" style="width:80px">位置：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:180px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <a class="btn btn-primary" href="javascript:parent.openIframeLayer('/index.php?g=Admin&m=Arttomb&a=users','添加使用人',{}, '800px', '560px')">详细墓碑信息</a>
                        </div>
                    </div>
                    <div style="width:100%;float:left">
                        <div class="control-group1" style="width:8%">
                            <label class="control-label">【<input type="text" name="mb_name[]" value="定制墓穴2" style="width: 70px;border: 0">】</label>
<!--                            <label class="control-label">【定制墓穴2】：</label>-->
                        </div>
                        <div class="control-group1" style="width:16%;">
                            <label class="control-label" style="width:80px">占地规格：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:120px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓碑总高：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓穴规制：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:20%;">
                            <label class="control-label" style="width:100px">单穴最大尺寸：</label>
                            <div class="controls" style=" margin-left:110px;">
                                <input type="text" class="form-control" value="" >
                            </div>
                        </div>
                        <div class="control-group1" style="width:18%;">
                            <label class="control-label" style="width:80px">位置：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:180px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <a class="btn btn-primary" href="javascript:parent.openIframeLayer('/index.php?g=Admin&m=Arttomb&a=users','添加使用人',{}, '800px', '560px')">详细墓碑信息</a>
                        </div>
                    </div>
                    <div style="width:100%; float:left">
                        <div class="control-group1" style="width:8%">
                            <label class="control-label">【<input type="text" name="mb_name[]" value="定制墓穴3" style="width: 70px;border: 0">】</label>
<!--                            <label>【定制墓穴3】：</label>-->
                        </div>
                        <div class="control-group1" style="width:16%;">
                            <label class="control-label" style="width:80px">占地规格：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:120px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓碑总高：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <label class="control-label" style="width:80px">墓穴规制：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:60px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:20%;">
                            <label class="control-label" style="width:100px">单穴最大尺寸：</label>
                            <div class="controls" style=" margin-left:110px;">
                                <input type="text" class="form-control" value="" >
                            </div>
                        </div>
                        <div class="control-group1" style="width:18%;">
                            <label class="control-label" style="width:80px">位置：</label>
                            <div class="controls" style=" margin-left:90px;">
                                <input type="text" class="form-control" value="" style="width:180px;">
                            </div>
                        </div>
                        <div class="control-group1" style="width:12%;">
                            <a class="btn btn-primary" onclick="doSelect()" >详细墓碑信息</a>

<!--                            <a class="btn btn-primary" href="javascript:parent.openIframeLayer('/index.php?g=Admin&m=Arttomb&a=users','详细墓碑信息',{}, '700px', '460px')">详细墓碑信息</a>-->
                        </div>
                    </div>
                    <div class="control-group1" style="width:100%;margin-left: 6%">
                        <div class="btn btn-primary" id="add_gaiban">添加其他材料</div>
                    </div>
                </div>
			</fieldset>
			<div class="form-actions">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
    <script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
<script>
    /*选择商品*/
function doSelect(){
    openIframeLayer("tombarea/sele", '请选择分类', {
        area: ['700px', '400px'],
        btn: ['确定', '取消'],
        yes: function (index, layero) {
            //do something

            var iframeWin          = window[layero.find('iframe')[0]['name']];
            var selectedCategories = iframeWin.confirm();
            console.log('又返回么',selectedCategories);
            if (selectedCategories.selectedCategoriesId.length == 0) {
                layer.msg('请选择商品');
                return;
            }
            $('.use_way_id2').find('input').eq(1).val(selectedCategories.selectedCategoriesId);
            $('.use_way_id2').find('input').eq(0).val(selectedCategories.selectedCategoriesName);
            //console.log(layer.getFrameIndex(index));
            layer.close(index); //如果设定了yes回调，需进行手工关闭
        }
    });
};
$(function () {

    var catehtml = "";
    var json = {$cateJson};
    $.each(json, function(i, n){
        catehtml += "<option value='"+n.id+"'>"+n.name+"</option>";
    })

    $('#add_gaiban').click(function () {
        var str =   "<div name='d_gaiban'><div class='control-group1'>"+
            "<label class='control-label'>盖板:</label>"+
            "<input type='hidden' name='pname[]' value='盖板' >"+
            "<input type='hidden' name='psort[]' value=1 >"+
            "<div class='controls'>"+
            "<input type='text' name='pwidth[]' placeholder='宽' class='minwidth form-control'  value='' style='margin-right:5px'>"+
            "<input type='text' name='pheight[]' placeholder='高' class='minwidth form-control' value='' style='margin-right:5px'>"+
            "<input type='text' name='pthick[]' placeholder='厚' class='minwidth form-control' value=''> mm"+
            "</div>"+
            "</div>"+
            "<div class='control-group1'>"+
            "<label class='control-label'>石材种类:</label>"+
            "<div class='controls'>"+
            "<select class='form-control' name='pcate[]'>";
        str+=catehtml;
        str+="</select>"+
            "</div>"+
            "</div>"+
            "<div class='control-group1' style='width:16%'>"+
            "<label class='control-label'>数量:</label>"+
            "<div class='controls'>"+
            "<input type='text' class='form-control' name='pnumber[]' style='width:100px;' value=''>"+
            "</div>"+
            "</div>"+
            "<div class='control-group1' style='width:16%' >"+
            "<label class='control-label'>维修价格:</label>"+
            "<div class='controls'>"+
            " <input type='text' class='form-control' name='prepair_price[]' style='width:100px;' value=''>"+
            "</div>"+
            "</div>"+
            "<div class='control-group1'  style='width:14%'>"+
            "<label class='control-label'>更换价格:</label>"+
            "<div class='controls'>"+
            "<input type='text' class='form-control' name='pchange_price[]' style='width:85px;' value=''>"+
            "</div>"+
            "</div>"+
            "<div class='control-group' style='width:2%;float:left'>" +
            "<div class='btn btn-primary' id='del_gaiban'>-</div>" +
            "</div></div>";

        $(this).parent("div").after(str);
    })
})
</script>
</body>
</html>